//
//  KeleData.h
//  KeleAppProject
//
//  Created by Cen Zhou on 2018/1/24.
//  Copyright © 2018年 Cen Zhou. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^KlResponseSuccess)(id responseObject);
typedef void (^KlResponseFail)(NSError * error);



@interface KeleData : NSObject

extern NSString * const URL_ROOT;

extern NSString * const SENDCODE;

extern NSString * const FASTLOGIN;

extern NSString * const ACCOUNTLOGIN;

extern NSString * const REGISTER;

extern NSString * const FORGETPWD;

extern NSString * const HOMERECOMMEND;

+ (KeleData *)sharedInstance;

// 发送验证码
- (void)sendPhoneCodeWithPhone:(NSString *)phone
                       success:(KlResponseSuccess)success
                       failure:(KlResponseFail)failure;

// 手机号快速登录
- (void)phoneFastLoginWithPhone:(NSString *)phone
                      sessionId:(NSString *)sessionId
                           code:(NSString *)code
                        success:(KlResponseSuccess)success
                        failure:(KlResponseFail)failure;

// 手机号账户密码登录
- (void)phoneAccountLoginWithPhone:(NSString *)telephone
                          password:(NSString *)password
                           success:(KlResponseSuccess)success
                           failure:(KlResponseFail)failure;

// 注册
- (void)registerWithPhone:(NSString *)telephone
                sessionId:(NSString *)sessionId
                     code:(NSString *)code
                 password:(NSString *)password
                  success:(KlResponseSuccess)success
                  failure:(KlResponseFail)failure;

// 忘记密码
- (void)forgetPasswordWithPhone:(NSString *)phone
                      sessionId:(NSString *)sessionId
                           code:(NSString *)code
                       password:(NSString *)password
                        success:(KlResponseSuccess)success
                        failure:(KlResponseFail)failure;

// 首页推荐
- (void)recommendWithPage:(NSString *)currentPage
               pageNumber:(NSString *)pageNumber
                  success:(KlResponseSuccess)success
                  failure:(KlResponseFail)failure;


@end
